//
//  electra.h
//  electra1131
//
//  Created by CoolStar on 6/6/18.
//  Copyright © 2018 CoolStar. All rights reserved.
//

#ifndef electra_h
#define electra_h

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#import <sys/mount.h>
#import <spawn.h>
#import <mach-o/dyld.h>
#import <sys/types.h>
#import <sys/stat.h>
#import <sys/utsname.h>

#include <mach/mach.h>

#include <CoreFoundation/CoreFoundation.h>

enum {
    ERR_NOERR = 0,
    ERR_VERSION = -1,
    ERR_EXPLOIT = -2,
    ERR_UNSUPPORTED = -3,
    ERR_TFP0 = -4,
    ERR_ALREADY_JAILBROKEN = -5,
    ERR_AMFID_PATCH = -6,
    ERR_ROOTFS_REMOUNT = -7,
    ERR_SNAPSHOT = -8,
    ERR_JAILBREAK = -9,
    ERR_CONFLICT = -10,
};

void snapshotWarningRead(void);

int start_electra(mach_port_t tfp0, bool enable_tweaks);
int start_jailbreakd(uint64_t kernel_base);

#endif /* electra_h */
